<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width= , initial-scale=1.0">
    <title>Document</title>
</head>
<body>
      <script>
          new Promise((resolve,reject)=>{
                console.log('获取数据a........');
            try{
                    setTimeout(()=>{
                        console.log('获取a数据成功');
                        const name ={
                            user:'xiaoa'
                        }
                        resolve(name)
                    },2000)
            }catch(e){
                reject(e.message)
            }


          })
          .then ((velue)=>{
            return new Promise((resolve,reject)=>{
                console.log('获取数据b....');
                try{
                    setTimeout(()=>{
                        console.log('获取b数据成功');
                        const age ={
                            age:18
                        }
                        resolve({
                            ...value,
                            ...age
                        })
                    },2000)
            }catch(e){
                reject(e.message)
            }
            })
          })
          .then ((velue)=>{
            return new Promise((resolve,reject)=>{
                console.log('获取数据c....');
                try{
                    setTimeout(()=>{
                        console.log('获取c数据成功');
                        const sex ={
                            sex:'女'
                        }
                        resolve({
                            ...value,
                            ...sex
                        })
                    },2000)
            }catch(e){
                reject(e.message)
            }
            })
          })
          .then(value=>{
            console.log(value);
          })
          .catch(reason =>{
            console.log('你异常了');
          })
      </script>
</body>
</html>